export default {
	data() {
		return {
			screenHeight: 0,
			navHeight: 0,
			tabbarHeight: 0,
			menuBarHeight: '40px',
			menuBarWidth: 0,
			iconCheck: '/static/images/icon-check.png',
			iconChecked: '/static/images/icon-checked-o.png',
			iconCheckedB: '/static/images/icon-checked.png',
		}
	},
	mounted() {
		const system = uni.getSystemInfoSync()
		const menuBar = uni.getMenuButtonBoundingClientRect()
		// 获取屏幕高度
		let screenHeight = system.windowHeight - system.safeAreaInsets.bottom
		// 获取导航栏高度
		// let menuButtonObject = uni.getMenuButtonBoundingClientRect()'
		let navBarHeight = 44 + system.statusBarHeight
		// 计算可视窗口高度减去导航栏高度
		screenHeight -= navBarHeight
		this.screenHeight = screenHeight+'px'
		this.navHeight = navBarHeight+'px'
		// #ifdef MP
		this.menuBarHeight = menuBar.height + 'px'
		this.menuBarWidth = (menuBar.width + 20) + 'px'
		// #endif
		this.tabbarHeight = (50 + system.safeAreaInsets.bottom) + 'px'
		// 设置全局参数
		this.$globalData.screenHeight = screenHeight
		this.$globalData.navHeight = navBarHeight
	}
}